import TileMap from "./TileMap.js"


//砖块尺寸
const tileSize = 32;
//吃豆人移动速度
const velocity = 1

const canvas = document.getElementById('gameCanvas')
const ctx = canvas.getContext('2d')
const tileMap = new TileMap(tileSize);
const pacman=tileMap.getPacman(velocity)

function gameLoop() {
    tileMap.draw(ctx);
    pacman.draw(ctx);
}

tileMap.setCanvasSize(canvas)

setInterval(gameLoop,1000/75)